<?php

use App\Http\Controllers\Api\CommonController;
use App\Http\Controllers\Api\OrderController;
use App\Http\Controllers\Publik\IndexController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

use App\Http\Controllers\Backend\ApiController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::group([ 'prefix' => 'v1'], function () {
    // 生成token接口
    Route::get('generate/token', [CommonController::class,'generateToken']);
    // 预付款冻结申请 20230815 by LC
    Route::get('advance/apply', [ApiController::class, 'advanceScoreApply']);
    // 预付款冻结完成 20230815 by LC
    Route::get('advance/done', [ApiController::class, 'advanceScoreSuccess']);
    // 预付款冻结取消 20230815 by LC
    Route::get('advance/cancel', [ApiController::class, 'advanceScoreCancel']);
    // 获取用户积分 20230815 by LC
    Route::get('get/score', [ApiController::class, 'getUserScore']);
    // 获取 redis keys
    Route::get('get/redis-keys', [IndexController::class, 'getRedisKeys']);
    Route::post('clear/redis-key', [IndexController::class, 'clearRedisKey']);
    // 开通企业租户
    Route::post('enterprise/tenant/create', [ApiController::class, 'createEnterpriseTenant']);
    // 给企业租户 加通勤积分
    Route::post('enterprise/tenant/incr/axd', [ApiController::class, 'incrTenantAxd']);
    // 验证 点是否合法。
    Route::post('check/gps/avail', [ApiController::class, 'checkGpsPointAvail']);
    // 获得企业员工的 通勤积分
    Route::get('get/enterprise/clerk/axd', [ApiController::class, 'getEnterpriseClerkAxd']);
    // 申请并完成冻结 企业员工的通勤积分
    Route::post('apply/frozen/enterprise/clerk/axd', [ApiController::class, 'applyFrozenUserCommuteAxd']);
    // 取消冻结 企业员工的通勤积分
    Route::post('cancel/frozen/enterprise/clerk/axd', [ApiController::class, 'cancelFrozenUserCommuteAxd']);
    // 申请并完成冻结 用户的出行积分
    Route::post('apply/frozen/gycx/axd', [ApiController::class, 'applyFrozenUserGycxAxd']);
    // 取消冻结 用户的出行积分
    Route::post('cancel/frozen/gycx/axd', [ApiController::class, 'cancelFrozenUserGycxAxd']);
    //  从地图接口获取地址解析
    Route::get('get/address/map/analyse', [ApiController::class, 'getAddressMapAnalyse']);
    //  从地图接口获取两点的距离
    Route::get('get/distance/between/locations', [ApiController::class, 'getDistanceBetweenLocations']);

});

